<div class="container-fluid discovery-container">
    <div post-single class="discovery">
        查找到的结果：
        <div class="post-content">
            <!--如果不是匿名的则显示头像和昵称-->
            <div ng-if="post.anonymous == 'false'" class="author">
                <img src="{{ post.author.avatar }}" width="30" height="30" />
                <a href="{{ post.author.name }}">
                    {{ post.author.name }}
                </a>
            </div>
            <!--发表时间-->
            <div class="post-time">
                {{ post.time | date:'yyyy-MM-dd HH:mm:ss' }}
            </div>

            <!-- 经过格式转换的内容  -->
            <span ng-bind-html='post.content | contentFilter'></span>
            <div class="infos">
                <div class="opta" ng-if="post.tags">
                    <span class="glyphicon glyphicon-tags"></span>
                            <span class="post-tag" ng-repeat="tag in post.tags">
                                {{ tag }}
                            </span>
                </div>
                <div class="optb">
                    <span class="like-button" ng-click="vote(post)">热度({{ post.good }})</span>
                    <span class="comment-button comments" ng-click="isCollapsed = !isCollapsed">评论({{ post.comments }})</span>
                </div>
            </div>
        </div>

        <div id="commentBox" collapse="isCollapsed">
            <div class="shadow"></div>
            <div class="up-arrow"></div>
            <form class="comment-form">
                <input type="text" name="content" ng-model="content" placeholder="评论" />
                <input type="checkbox" name="inPrivate" ng-model="inPrivate"> <span title="只对你和他显示">秘密评论</span>
                <input type="submit" class="comment" value="发 布" />
            </form>

            <ul class="comment-list">
                <li ng-repeat="comment in comments">
                    <a href="{{ comment.userName }}">{{ comment.userName }}</a> :
                    {{ comment.content }}

                    <span class="comment-time">{{ comment.time | date: 'yyyy-MM-dd HH:mm:ss' }}</span>
                    <!--登录后有删除按钮-->
                    <a ng-if="name == comment.userName" href="javascript:;" deleteId="{{$index}}" class="deleteCommentButton">删除</a>
                </li>
            </ul>
        </div>
    </div>
</div>
